#include <iostream>
#include <vector>

using namespace std;

template <class Polynomial> class PolynomialInterface {

		virtual Polynomial add(const Polynomial& p) = 0;
};

template <class PolyRing > class Polynomial: public PolynomialInterface< Polynomial<PolyRing> > {
	public:
			Polynomial(){};
			Polynomial add(const Polynomial& p) {
				cout << "adding two polynomials" << endl;
				return Polynomial();
			}
};




//! Force each polynomial ring to be a type, never get initialized
//! all members are static
//! supply a macro to build a ring type
class Qxy {
	virtual ~Qxy()=0;
	static string vars[2];
	static string order;
};

#define BUILDRING(ringname, vars, char, order) 

#define BUILDARING(ringname) class ringname {}

class Qxyz {
	virtual ~Qxyz()=0;
	static string vars[];
	static string order;
};


// vector string(char**) {
// };

// const char xy[2][1] = {"x", "y"}; 
// vector<string> 
string Qxy::vars[]= {"x", "y"};
string Qxy::order = "Lex";

//class myRing {}; // include a header, define the ring

BUILDARING(myRing);

int main(){
	
	Polynomial<Qxy> p1, p2;
	// BUILDARING myRing;
	Polynomial<myRing> p3, p4;
	p1.add(p2);
	p3.add(p4);
	return 0;
}
